import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:sonora/Screens/Home/home_screen.dart';
import 'package:sonora/Screens/Login/login_screen.dart';
import 'package:sonora/components/background.dart';

import 'package:sonora/Screens/Guild/guild_screen.dart';

import 'package:sonora/Screens/Guild/components/guild_frame.dart';

import 'package:sonora/constants.dart';
import 'package:sonora/Screens/Start/start_screen.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  SystemChrome.setSystemUIOverlayStyle(
      SystemUiOverlayStyle( statusBarColor: Colors.transparent )
  );
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          primaryColor: kPrimaryColor,
          fontFamily: "Galada",
          scaffoldBackgroundColor: Colors.white,
          elevatedButtonTheme: ElevatedButtonThemeData(
            style: ElevatedButton.styleFrom(
              elevation: 0,
              foregroundColor: Colors.white,
              backgroundColor: kPrimaryColor,
              shape: const StadiumBorder(),
              maximumSize: const Size(double.infinity, 56),
              minimumSize: const Size(double.infinity, 56),
            ),
          ),
          textTheme: const TextTheme(
            displayLarge: const TextStyle(

              decoration: TextDecoration.none,
              fontFamily: 'Galada',
            ),

            titleLarge: const TextStyle(

              decoration: TextDecoration.none,
              fontFamily: 'Galada',
            ),
            bodyMedium: const TextStyle(

              decoration: TextDecoration.none,
              fontFamily: 'Galada',
            ),
            displaySmall: const TextStyle(

              decoration: TextDecoration.none,
              fontFamily: 'Galada',
            ),

          )
        ),
        // home: LoginScreen(),
        home: HomeScreen(),
        // home: GuildScreen(),
        // home: const Background(child: GuildView(), bgImage: "assets/images/guild_bg.png")
        // home: Background(
        //     child: GuildFrame(
        //         icon:'assets/icons/right.png',
        //         description1:'Explore handpan melodies and',
        //         description2:'connect globally.',
        //         press: () {
        //           print('123');
        //         },
        //     ),
        //     bgImage: "assets/images/guild_bg3.png"
        // ),
    );
  }
}

class GuildView extends StatelessWidget {
  const GuildView({Key?key}):super(key: key);

  @override
  Widget build(BuildContext context) {
    return Text('首页', style: TextStyle(
        fontWeight: FontWeight.bold,
        color: Colors.black
      ),
    );
  }
}


